package com.ys.entity.sys;

import java.util.Date;
import javax.persistence.Table;
import com.ys.annotation.YsField;
import com.ys.entity.base.BaseEntity;
/**
*/
@Table(name="YS_RoleMenu", catalog="Id")
public class YsRoleMenu extends BaseEntity<YsRoleMenu> {

	@YsField(nameDataBase="Id", nameJava="id", typeDataBase="bigint")
	private Long id;
	@YsField(nameDataBase="RoleId", nameJava="roleId", typeDataBase="bigint")
	private Long roleId;
	@YsField(nameDataBase="MenuId", nameJava="menuId", typeDataBase="bigint")
	private Long menuId;
	@YsField(nameDataBase="Type", nameJava="type", typeDataBase="tinyint")
	private Integer type;
	@YsField(nameDataBase="Status", nameJava="status", typeDataBase="tinyint")
	private Integer status;
	@YsField(nameDataBase="CreateTime", nameJava="createTime", typeDataBase="datetime")
	private Date createTime;
	@YsField(nameDataBase="UpdateTime", nameJava="updateTime", typeDataBase="datetime")
	private Date updateTime;

	public Long getId() {
		return id;
	}
	public YsRoleMenu setId(Long id) {
		this.id = id;
		return this;
	}
	public Long getRoleId() {
		return roleId;
	}
	public YsRoleMenu setRoleId(Long roleId) {
		this.roleId = roleId;
		return this;
	}
	public Long getMenuId() {
		return menuId;
	}
	public YsRoleMenu setMenuId(Long menuId) {
		this.menuId = menuId;
		return this;
	}
	public Integer getType() {
		return type;
	}
	public YsRoleMenu setType(Integer type) {
		this.type = type;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public YsRoleMenu setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public YsRoleMenu setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public YsRoleMenu setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static YsRoleMenu ysRoleMenu(
		Long roleId,
		Long menuId,
		Integer type,
		Integer status
			) {
		YsRoleMenu entity = new YsRoleMenu();
		entity.setRoleId(roleId);
		entity.setMenuId(menuId);
		entity.setType(type);
		entity.setStatus(status);
		return entity;
	}
}